package com.suda.jzapp.dao.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.suda.jzapp.dao.greendao.RecordType;
import com.suda.jzapp.dao.greendao.Budget;
import com.suda.jzapp.dao.greendao.User;
import com.suda.jzapp.dao.greendao.RemarkTip;
import com.suda.jzapp.dao.greendao.Account;
import com.suda.jzapp.dao.greendao.YiYan;
import com.suda.jzapp.dao.greendao.AccountType;
import com.suda.jzapp.dao.greendao.Currency;
import com.suda.jzapp.dao.greendao.Config;
import com.suda.jzapp.dao.greendao.Record;

import com.suda.jzapp.dao.greendao.RecordTypeDao;
import com.suda.jzapp.dao.greendao.BudgetDao;
import com.suda.jzapp.dao.greendao.UserDao;
import com.suda.jzapp.dao.greendao.RemarkTipDao;
import com.suda.jzapp.dao.greendao.AccountDao;
import com.suda.jzapp.dao.greendao.YiYanDao;
import com.suda.jzapp.dao.greendao.AccountTypeDao;
import com.suda.jzapp.dao.greendao.CurrencyDao;
import com.suda.jzapp.dao.greendao.ConfigDao;
import com.suda.jzapp.dao.greendao.RecordDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig recordTypeDaoConfig;
    private final DaoConfig budgetDaoConfig;
    private final DaoConfig userDaoConfig;
    private final DaoConfig remarkTipDaoConfig;
    private final DaoConfig accountDaoConfig;
    private final DaoConfig yiYanDaoConfig;
    private final DaoConfig accountTypeDaoConfig;
    private final DaoConfig currencyDaoConfig;
    private final DaoConfig configDaoConfig;
    private final DaoConfig recordDaoConfig;

    private final RecordTypeDao recordTypeDao;
    private final BudgetDao budgetDao;
    private final UserDao userDao;
    private final RemarkTipDao remarkTipDao;
    private final AccountDao accountDao;
    private final YiYanDao yiYanDao;
    private final AccountTypeDao accountTypeDao;
    private final CurrencyDao currencyDao;
    private final ConfigDao configDao;
    private final RecordDao recordDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        recordTypeDaoConfig = daoConfigMap.get(RecordTypeDao.class).clone();
        recordTypeDaoConfig.initIdentityScope(type);

        budgetDaoConfig = daoConfigMap.get(BudgetDao.class).clone();
        budgetDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        remarkTipDaoConfig = daoConfigMap.get(RemarkTipDao.class).clone();
        remarkTipDaoConfig.initIdentityScope(type);

        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
        accountDaoConfig.initIdentityScope(type);

        yiYanDaoConfig = daoConfigMap.get(YiYanDao.class).clone();
        yiYanDaoConfig.initIdentityScope(type);

        accountTypeDaoConfig = daoConfigMap.get(AccountTypeDao.class).clone();
        accountTypeDaoConfig.initIdentityScope(type);

        currencyDaoConfig = daoConfigMap.get(CurrencyDao.class).clone();
        currencyDaoConfig.initIdentityScope(type);

        configDaoConfig = daoConfigMap.get(ConfigDao.class).clone();
        configDaoConfig.initIdentityScope(type);

        recordDaoConfig = daoConfigMap.get(RecordDao.class).clone();
        recordDaoConfig.initIdentityScope(type);

        recordTypeDao = new RecordTypeDao(recordTypeDaoConfig, this);
        budgetDao = new BudgetDao(budgetDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);
        remarkTipDao = new RemarkTipDao(remarkTipDaoConfig, this);
        accountDao = new AccountDao(accountDaoConfig, this);
        yiYanDao = new YiYanDao(yiYanDaoConfig, this);
        accountTypeDao = new AccountTypeDao(accountTypeDaoConfig, this);
        currencyDao = new CurrencyDao(currencyDaoConfig, this);
        configDao = new ConfigDao(configDaoConfig, this);
        recordDao = new RecordDao(recordDaoConfig, this);

        registerDao(RecordType.class, recordTypeDao);
        registerDao(Budget.class, budgetDao);
        registerDao(User.class, userDao);
        registerDao(RemarkTip.class, remarkTipDao);
        registerDao(Account.class, accountDao);
        registerDao(YiYan.class, yiYanDao);
        registerDao(AccountType.class, accountTypeDao);
        registerDao(Currency.class, currencyDao);
        registerDao(Config.class, configDao);
        registerDao(Record.class, recordDao);
    }
    
    public void clear() {
        recordTypeDaoConfig.clearIdentityScope();
        budgetDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
        remarkTipDaoConfig.clearIdentityScope();
        accountDaoConfig.clearIdentityScope();
        yiYanDaoConfig.clearIdentityScope();
        accountTypeDaoConfig.clearIdentityScope();
        currencyDaoConfig.clearIdentityScope();
        configDaoConfig.clearIdentityScope();
        recordDaoConfig.clearIdentityScope();
    }

    public RecordTypeDao getRecordTypeDao() {
        return recordTypeDao;
    }

    public BudgetDao getBudgetDao() {
        return budgetDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public RemarkTipDao getRemarkTipDao() {
        return remarkTipDao;
    }

    public AccountDao getAccountDao() {
        return accountDao;
    }

    public YiYanDao getYiYanDao() {
        return yiYanDao;
    }

    public AccountTypeDao getAccountTypeDao() {
        return accountTypeDao;
    }

    public CurrencyDao getCurrencyDao() {
        return currencyDao;
    }

    public ConfigDao getConfigDao() {
        return configDao;
    }

    public RecordDao getRecordDao() {
        return recordDao;
    }

}
